package cn.labelnet.android.roomdb.base.data.tables

import android.arch.persistence.room.ColumnInfo
import android.arch.persistence.room.Entity
import android.arch.persistence.room.PrimaryKey
import java.util.*

/**
 * Created by yuan on 02/08/2017.
 * 用户表
 * id 自增
 */
@Entity(tableName = "user")
data class UserTable constructor(@ColumnInfo(name = "u_id")
                                 @PrimaryKey(autoGenerate = true)
                                 var id: Int = 0,
                                 @ColumnInfo(name = "u_name")
                                 var name: String? = null,
                                 @ColumnInfo(name = "u_phone")
                                 var phone: String? = null,
                                 @ColumnInfo(name = "u_create_date")
                                 var createDate: Date? = null,
                                 @ColumnInfo(name = "u_update_date")
                                 var updateDate: Date? = null,
                                 @ColumnInfo(name = "u_status")
                                 var status: Int? = 0
) {
    // 实现构造函数
    constructor() : this(0)
}

